<?php if (!defined('THINK_PATH')) exit();?>
<!DOCTYPE HTML>
<html >
<html lang="en" xmlns:wb="http://open.weibo.com/wb">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<!--[if lt IE 9]>
<script>(function(tags){for(var i=0; i<tags.length; i++)document.createElement(tags[i]);})(["article","aside","details","figcaption","figure","footer","header","hgroup","nav","section","video"]);</script>
<![endif]-->
<link href="/smfs/Public/home/css/global.css?v=1.0" rel="stylesheet" type="text/css">
<link href="/smfs/Public/home/css/user.css?v=1.0" rel="stylesheet" type="text/css">
<link href="/smfs/Public/home/css/common.css?v=1.0" rel="stylesheet" type="text/css"><!--放在文件所有样式文件最末尾，保证规则的优先级-->
<title>云衣定制-欢迎登录</title>

<link href="/smfs/Public/css/layui.css" rel="stylesheet" type="text/css" media="all"/>
<script type="text/javascript" src="/smfs/Public/layui.js"></script>

<script type="text/javascript" src="/smfs/Public/home/js/jquery.js"></script>
<script src="http://tjs.sjs.sinajs.cn/open/api/js/wb.js?appkey=1898735469" type="text/javascript" charset="utf-8"></script>
</head>

<body class="login">

<div class="registLogoTopBox">
    <div class="container">
        <a href="<?php echo U('home/index/index');?>" id="redLogo">返回首页</a>
        <a href="<?php echo U('home/user/reg');?>" class="fr marginTop50 marginRight50 font14">立即注册</a>
    </div>
</div>
<div class="loginBg">
    <div class="container moveOn">
        <div class="loginBigBox">
            <aside class="adWrap marginTop50"></aside>
            <div class="loginWrap">
                <div class="loginBgColor">
                    <div class="loginTitleWrap">
                        <div class="loginTitleBox">
                            <ul>
                                <li class="current" id="loginBtnF1"> 登录</li>
                                <!-- <li id="loginBtnF2">手机验证码登录</li> -->
                            </ul>
                        </div>
                    </div>
                    <form class="loginFrom newsRegistFrom layui-form" method="post">
                        <div class="loginRightBox clearfix">
                            <ul class="inputList newsInputList">
                                <li id="loginIpt1">
                                    <input type="text" name="phone" id="userName" required  lay-verify="required" placeholder="请输入您的手机" style="background-position:10px;width:350px;" class="whiteBg" />
                                </li>
                                <li id="loginIpt2">
                                    <input type="password" name="password" id="passWord" required  lay-verify="required" placeholder="请输入您的密码" style="background-position:10px;width:350px;" class="whiteBg" />
                                </li>
                                <li id="loginIpt2" >
                                    <input type="text" name="send_to" placeholder="请输入您的手机验证码" style="width:245px;background: url(/smfs/Public/home/images/getCode.png) no-repeat 10px center;" class="whiteBg" /><a href="javascript:void(0);" id="getCode" onclick="get_mobile_valid();">获取验证码</a>
                                </li>
                                <!-- <li id="loginIpt3">
                                    <input type="text" name="mobilePhone" placeholder="请输入您的手机号码" style="background-image:url(/smfs/Public/home/images/mobileicon.png);background-position:10px;background-repeat:no-repeat;width:350px;" class="whiteBg" />
                                </li>-->  
                               <!-- <li id="loginIpt4" >
                                    <input type="text" name="checkNo" id="checkNo" placeholder="请输入您的手机验证码" style="width:245px;background: url(/smfs/Public/home/images/getCode.png) no-repeat 10px center;" class="whiteBg" /><a href="javascript:void(0);" id="getCode">获取验证码</a>
                                </li> -->
                                <li class="textAlignLeft" style="height: 15px;">
                                    <label class="floatleft checkAlign" for="checkbox">
                                        <!-- <input type="checkbox" name="autoLogin" id="checkbox" class="checkAlign" style="height:16px;width:16px;" disabled>自动登录 -->
                                    </label>
                                    <span class="floatRight marginRight20"><a href="findPassword.html" style="color:#999">忘记密码？</a></span>
                                </li>
                                <li id="errorWrap" style="" class="newErrorWrap"><span class="textAlignLeft"></span></li>
                                <li>
                                    <button lay-submit lay-filter="*" style="background-color: #07b6ef;display: block;width: 400px;height: 46px;border:0px;color:#fff;">立即登录</button>
                                </li>
                            </ul>
                        </div>
                    </form>
                    <!-- 第三方登录需要公网域名及公司级公共账号下来后才能实现，现暂时将第三方登录入口屏蔽  -->
                    <div class="loginTilBg"><!-- <img src="/smfs/Public/home/images/logoinTil.png" height="14"  alt="" /> --></div>
                    <!-- <div style="margin-left:140px;" class="clearfix">
                        <a href="https://graph.qq.com/oauth2.0/authorize?response_type=code&client_id=101267571&redirect_uri=http://www.yunyidzw.com/html/login/qqLogin.html&scope=get_user_info" id="QQBig">QQ</a>
                        <a href="" id="weixin">微信</a>
                        <a href="https://api.weibo.com/oauth2/authorize?client_id=1898735469&redirect_uri=http://www.yunyidzw.com/html/login/weiboLogin.html&response_type=code" id="sinaBig">新浪</a>
                        <a href="https://openapi.baidu.com/oauth/2.0/authorize?response_type=code&client_id=G6GOPhU7yEzlzWz2PDdVLMOG&redirect_uri=http://www.yunyidzw.com/html/login/baiduLogin.html" id="baiduBig">百度</a>
                    </div> -->
                </div>
            </div>
        </div>
            
    </div>    
</div>

<footer class="simpleFooter">
    <div class="container moveOn">
      <aside class="">
        <a href="../../html/foot/foot_enterpriseProfile.html">关于我们</a>  
        <a href="../../html/foot/foot_contact.html">联系我们</a>  
        <a href="../../html/foot/foot_businessCooperation.html">商务合作</a>  
        <a href="javascript:void(0)">免费声明</a>   
        <a href="javascript:void(0)">服务指南</a>    
        <a href="../../html/foot/foot_customerService.html#tousu">意见反馈</a>  
    </aside>
    <dl>
            <dd class="fl" style="margin-left:450px">
            深圳市博克时代科技开发有限公司©版权所有<br/>
            <a target="_black" href="http://www.miitbeian.gov.cn/" class="icpNumber">粤ICP备10218621号-7</a>
            </dd>
            <dd class="fl">
            <img src="/smfs/Public/home/images/buttomicon.png">
            </dd>
        </dl>
    </div>
</footer>

<script type="text/javascript">
    layui.use(['form'], function(){
      var layer = layui.layer
      ,form = layui.form();
      //layer.msg('Hello World');

    form.on('submit(*)', function(data){
        $.ajax({
            url: "<?php echo U('home/login/login');?>",//请求地址
            type: "post",//请求方式
            dataType: "json",//返回数据类型
            data: data.field,//发送的参数
            })
            .done(function(response) {
                  if(response.error==0){
                     layer.msg(response.info ,{icon:5});

                  }else{
                     layer.msg(response.info ,{icon:6});
                     location.href = response.url;
                  }
              })
            .fail(function() {
                alert("ajxs交互失败");
            })  

          return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
        });  
    });

    /*发送短信验证码*/
    function get_mobile_valid(){
        layer.confirm('确认要发送吗？',function(index){
            //发异步删除数据
            var to = $('input[name="phone"]').val();
            $.ajax({
                url: "<?php echo U('home/user/send_to');?>",//请求地址
                type: "post",//请求方式
                dataType: "json",//返回数据类型
                data: {to:to},//发送的参数
                })
                .done(function(response) {
                      if(response.error==1){
                        layer.msg(response.info ,{icon:6});
                      }else{
                        layer.msg(response.info ,{icon:5});
                      }
                  })
                .fail(function() {
                    alert("ajxs交互失败");
                })  
            return false;
        });
    }
</script>
</body>
</html>